<?php
$page = $_GET['page'];
$auth = $_SESSION['auth'];
?>                
		
		
		<div id="secCol">
                    <h3 id="news">User Info</h3>
                    <ul>
		    <li class="clearfix">
                       <p><center><a href="home.php?page=photo"><img src="photos/<?php echo $_SESSION['foto'];?>" border="0" width="140"></a></center></p>
                        </li>
                    	<li class="clearfix">
                       <p> Nome:<b> <?php echo ucwords($_SESSION['nome']); ?></b></p>
                        </li>
			<li class="clearfix">
                       <p> Cognome:<b> <?php echo ucwords($_SESSION['cognome']); ?></b> </p>
                        </li>
			<li class="clearfix">
                       <p> Auth:<b> <?php echo ucwords($_SESSION['auth']); ?></b> </p>
                        </li>
			<li class="clearfix">
                       <p> Ruolo:

			<?php 
				$id = $_SESSION['userid'];
				$cariche = mysql_query("select * from cariche where idanagrafica = '$id' order by auth desc");
				$cariche2 = mysql_fetch_array($cariche);
				echo '<b> ' . ucwords($cariche2['tipo'] . ' ' . $cariche2['settore'] . '</b>');
			?>
			
		   </p>
                        </li>
                    </ul>
                 
		 <?php if($page == 'bacheca')
		{
		?>
		<h3 id="test">Menu Bacheca</h3>
                    <ul>
                    <li class="clearfix">
                    <p><a href="home.php?page=aggiungipost">Aggiungi Post</a></p>
                    </li>
                    </ul>
		<?php
		}
		?> 


		 <?php if($page == 'servizi')
		{
		?>
		<h3 id="test">Menu Servizi</h3>
                    <ul>
		    
		<?php if(($auth>= 50) && ($auth!= 75)) { ?>
                    <li class="clearfix">
		<p><a href="home.php?page=aggiungiservizio">Aggiungi servizio</a></p>
                    </li>
		<li class="clearfix">
		<p><a href="home.php?page=confermaservizio">Conferma servizio</a></p>
                    </li>
		<li class="clearfix">
		<p><a href="home.php?page=archivio">Archivio servizi</a></p>
                    </li>
		<?php } ?>
		<li class="clearfix">
		<p><a href="home.php?page=segnalaservizio">Segnala servizio</a></p>
                    </li>
		<li class="clearfix">
		<p><a href="home.php?page=serv">I miei servizi</a></p>
                    </li>
		<?php if($auth>= 90) { ?>
		<li class="clearfix">
		<p><a href="home.php?page=grafici">Grafici</a></p>
                    </li>
		<?php } ?>
		
                    </ul>
		<?php
		}
		?>    
		
		
		<?php if($page == 'vestiario')
		{
		?>
		<h3 id="test">Menu Vestiario</h3>
                    <ul>
                    <li class="clearfix">
                    <p><a href="home.php?page=aggiungiindumento">Aggiungi</a></p>
                    </li>
		<li class="clearfix">
                    <p><a href="home.php?page=modificaindumento">Modifica</a></p>
                    </li>
		<li class="clearfix">
                    <p><a href="home.php?page=assegnaindumento">Assegna</a></p>
                    </li>
		<li class="clearfix">
                    <p><a href="home.php?page=restituzioneindumento">Restituzione</a></p>
                    </li>
                    </ul>
		<?php
		}
		?> 
		
		
		<?php if($page == 'farmacia')
		{
		?>
		<h3 id="test">Menu Farmacia</h3>
                    <ul>
                    <li class="clearfix">
                    <p><a href="home.php?page=aggiungifarmaco">Aggiungi</a></p>
                    </li>
		<li class="clearfix">
                    <p><a href="home.php?page=modificafarmaco">Modifica</a></p>
                    </li>
		<li class="clearfix">
                    <p><a href="home.php?page=scaricofarmaco">Scarico</a></p>
		</li>
                    </ul>
		<?php
		}
		?> 
		
		
		<?php if($page == 'contabilita')
		{
		?>
		<h3 id="test">Menu Contabilita'</h3>
                    <ul>
                    <li class="clearfix">
                    <p><a href="home.php?page=nuovaoperazione">Nuova Operazione</a></p>
                    </li>
		<li class="clearfix">
                    <p><a href="home.php?page=cercaoperazione">Cerca Operazione</a></p>
                    </li>
		</ul>
		<?php
		}
		?> 
		
		

		<h3 id="news">Options</h3>
                    <ul>
		
		<?php if($_SESSION['auth'] >= 90) { ?>
                    <li class="clearfix">
		<p><a href="home.php?page=gestioneutenti">Gestione utenti</a></p>
                    </li>
		<li class="clearfix">
		<p><a href="home.php?page=riserva">Gestione riserve ed esoneri</a></p>
                    </li>    
		<?php } ?>
		<?php if($_SESSION['auth'] > 99) { ?>
		<li class="clearfix">
		<p><a href="home.php?page=gestionecariche">Gestione cariche</a></p>
                    </li>
		<li class="clearfix">
		<p><a href="home.php?page=gestioneaccessi">Gestione accessi</a></p>
                    </li>
		<?php } ?>
		<li class="clearfix">
		<p><a href="home.php?page=modificaprofilo">Modifica profilo</a></p>
                    </li>
		<li class="clearfix">
		<p><a href="home.php?page=modificalogin">Modifica password</a></p>
                    </li>
		<?php if($auth > 99) { ?>
		<li class="clearfix">
		<p><a href="home.php?page=advancesettings">Advance settings</a></p>
                    </li>
		<?php } ?>
		<li class="clearfix">
		<p><a href="home.php?page=logout">Logout</a></p>
                    </li>
		
                    </ul> 

                    
                </div>
            </div>
        </div>
    </div>
    